#ifndef __APP_CFG_H__
#define __APP_CFG_H__

//按键使能
#define APP_KEYBOARD_ENABLE               TRUE
//TP使能
#define APP_TOUCHPAD_ENABLE               FALSE



/*  使用调试版本版本，关闭看门狗  */
#ifndef APP_ENABLE_RELEASE_VERSION
#define APP_ENABLE_RELEASE_VERSION                    1
#endif
//--------------------------------------------------------------------
/* 超低功耗 */
#if (APP_ENABLE_RELEASE_VERSION == 0)
    #ifndef POWER_SAVING_ENABLE
        #define POWER_SAVING_ENABLE                   0      /*调试阶段暂不开启*/
    #endif
#endif

//---------------------------------------------------------------------
/* 关闭看门狗 */
#if (APP_ENABLE_RELEASE_VERSION == 1)
    #ifndef WDT_DISABLE
        #define WDT_DISABLE                           0
    #endif
#endif

/* log 总开关 */
#if (APP_ENABLE_RELEASE_VERSION == 1)
    #ifndef APP_LOG_ALL_ENABLE					      
        #define APP_LOG_ALL_ENABLE                    0
    #endif
#endif
//----------------------------------------------------------------------
  /* 普通按键上报log */
#if (APP_LOG_ALL_ENABLE == 1)
    #ifndef APP_DEBUG_KEY_LOG_ENABLE
        #define APP_DEBUG_KEY_LOG_ENABLE               0
    #endif
#endif

  /* 多媒体按键log */
#if (APP_LOG_ALL_ENABLE == 1)
    #ifndef APP_DEBUG_MEDIA_KEY_LOG_ENABLE
        #define APP_DEBUG_MEDIA_KEY_LOG_ENABLE         0
    #endif
#endif

  /* 多媒体按键log */
#if (APP_LOG_ALL_ENABLE == 1)
    #ifndef APP_DEBUG_G_SENSOR_LOG_ENABLE
        #define APP_DEBUG_G_SENSOR_LOG_ENABLE          0
    #endif
#endif

  /* 上电有关log */
#if (APP_LOG_ALL_ENABLE == 1)
    #ifndef APP_DEBUG_POWER_ON_LOG_ENABLE
        #define APP_DEBUG_POWER_ON_LOG_ENABLE          1
    #endif
#endif

  /* 心跳log */
#if (APP_LOG_ALL_ENABLE == 1)
    #ifndef APP_LINK_HEART_ENABLE
        #define APP_LINK_HEART_ENABLE                  0
    #endif
#endif

  /* 单总线数据传输log */
#if (APP_LOG_ALL_ENABLE == 1)
    #ifndef APP_DEBUG_ONR_WIRE_BUS_LOG_ENABLE
        #define APP_DEBUG_ONR_WIRE_BUS_LOG_ENABLE      0
    #endif
#endif

  /* 单总线app层log */
#if (APP_LOG_ALL_ENABLE == 1)
    #ifndef APP_DEBUG_ONR_WIRE_BUS_APP_LOG_ENABLE
        #define APP_DEBUG_ONR_WIRE_BUS_APP_LOG_ENABLE  0
    #endif
#endif

  /* 升级相关log */
#if (APP_LOG_ALL_ENABLE == 1)
    #ifndef APP_OTA_UPDATA_LOG
        #define APP_OTA_UPDATA_LOG                     0
    #endif
#endif

  /* 产测相关log */
#if (APP_LOG_ALL_ENABLE == 1)
    #ifndef FACTORY_MODE_ON
        #define FACTORY_MODE_ON                        0
    #endif
#endif

  /* 霍尔相关log */
#if (APP_LOG_ALL_ENABLE == 1)
    #ifndef APP_HALL_DEBUG_LOG
        #define APP_HALL_DEBUG_LOG                     1
    #endif
#endif

  /* TP相关log */
#if (APP_LOG_ALL_ENABLE == 1)
    #ifndef APP_TP_DEBUG_LOG
        #define APP_TP_DEBUG_LOG                        0
    #endif
#endif

  /* UART log */
#if (APP_LOG_ALL_ENABLE == 1)
    #ifndef APP_UART_DEBUG_LIG
        #define APP_UART_DEBUG_LIG                      0
    #endif
#endif

    /* flashlog相关 log */
#if (APP_LOG_ALL_ENABLE == 1)
    #ifndef APP_FLASH_LOG_DEBUG_LOG
        #define APP_FLASH_LOG_DEBUG_LOG                 0
    #endif
#endif

    /* flashlog相关 log */
#if (APP_LOG_ALL_ENABLE == 1)
    #ifndef APP_TEST_SENSOR_ERROR
        #define APP_TEST_SENSOR_ERROR                   0
    #endif
#endif

#if (APP_LOG_ALL_ENABLE == 1)
    #ifndef APP_TEST_DATA
        #define APP_TEST_DATA                           0
    #endif
#endif

#define FLASH_LOG_PRINTF_FLAG                           0
//---------------------------------------------------------------------
/**
  * @brief  The assert_param macro is used for function's parameters check.
  * @param  expr: If expr is false, it calls assert_failed function
  *         which reports the name of the source file and the source
  *         line number of the call that failed. 
  *         If expr is true, it returns no value.
  * @retval None
  */
  #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
// #define assert_param(expr) ((void)0)
/* Exported functions ------------------------------------------------------- */

void assert_failed(uint8_t* file, uint32_t line);


#endif
